import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "@/Index";
// import Goods from "../components/Goods"
// import index from "../Index";
Vue.use(VueRouter)
// import Login from "../Login";

const routes = [
    {
        path: '/',
        component: () => import('../Login'),
    },
    {

        path: '/Index',
        name: 'Index',
        component: () => import('../Index'),
        children: [
            {
                path: '/',
                name: 'home',
                component: () => import('../views/home/Home')
            },
            {
                path: '/User',
                name: 'User',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/User')
            }, {
                path: '/Attendance',
                name: 'Attendance',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/Attendance')
            }, {
                path: '/Comment',
                name: 'Comment',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/Comment')
            }, {
                path: '/TeacherDoc',
                name: 'TeacherDoc',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/TeacherDoc')
            }, {
                path: '/ProjectDoc',
                name: 'ProjectDoc',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/ProjectDoc')
            }, {
                path: '/Project',
                name: 'Project',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/Project')
            }, {
                path: '/Log',
                name: 'Log',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/Log')
            }, {
                path: '/DailyLog',
                name: 'DailyLog',
                component: () => import(/* webpackChunkName: "about" */ '../views/class/DailyLog')
            }
        ]


    },
    {
        path: '/TeacherIndex',
        name: 'TeacherIndex',
        component: () => import('../TeacherIndex'),
        children: [
            {
                path: '/',
                name: 'home',
                component: () => import('../views/home/Home')
            },
            {
                path: '/TeacherUser',
                name: 'TeacherUser',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/TeacherUser')
            },
            {
                path: '/Goods',
                name: 'goods',
                component: () => import(/* webpackChunkName: "about" */ '../components/Goods')
            }, {
                path: '/Student',
                name: 'Student',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Student')
            }, {
                path: '/Archives',
                name: 'Archives',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Archives')
            }, {
                path: '/StuAtt',
                name: 'StuAtt',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/StuAtt')
            }, {
                path: '/Group',
                name: 'Group',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Group')
            }, {
                path: '/Score',
                name: 'Score',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Score')
            }, {
                path: '/ScoringScheme',
                name: 'ScoringScheme',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/ScoringScheme')
            }, {
                path: '/TeachingEvaluation',
                name: 'TeachingEvaluation',
                component: () => import(/* webpackChunkName: "about" */ '../views/teacher/TeachingEvaluation')
            }
        ]
    },
    {
        path: '/AdminIndex',
        name: 'AdminIndex',
        component: () => import('../AdminIndex'),
        children: [
            {
                path: '/',
                name: 'home',
                component: () => import('../views/home/Home')
            },
            {
                path:'/add_teacher',
                name:'add_teacher',
                component:() => import('../views/project/Add_Teacher')
            },
            {
                path:'/management_class',
                name:'management_class',
                component:() => import('../views/project/Management_Class')
            },
            {
                path:'/expert',
                name:'expert',
                component:() => import('../views/project/Expert')
            },
            {
                path:'/expert_rating',
                name:'expert_rating',
                component:() => import('../views/project/Expert_rating')
            }
        ]
    },
]


// const routes = [
//
//     /*登录页*/
//     {
//         path:'/Login',
//         name:'Login',
//         components:() =>import('../Login'),
//
//
//     }


/*学生后端*/

// {
//     path: '/',
//     component: () => import('../Index'),
//     children: [
//         {
//             path: '/',
//             name: 'home',
//             component: () => import('../views/home/Home')
//         },
//         {
//             path: '/Goods',
//             name: 'goods',
//             component: () => import(/* webpackChunkName: "about" */ '../components/Goods')
//         },{
//             path: '/Attendance',
//             name: 'Attendance',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/Attendance')
//         },{
//             path: '/Comment',
//             name: 'Comment',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/Comment')
//         },{
//             path: '/TeacherDoc',
//             name: 'TeacherDoc',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/TeacherDoc')
//         },{
//             path: '/ProjectDoc',
//             name: 'ProjectDoc',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/ProjectDoc')
//         },{
//             path: '/Project',
//             name: 'Project',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/Project')
//         },{
//             path: '/Log',
//             name: 'Log',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/Log')
//         },{
//             path: '/DailyLog',
//             name: 'DailyLog',
//             component: () => import(/* webpackChunkName: "about" */ '../views/class/DailyLog')
//         }
//     ]
// },

//
/*教师后端*/
// {
//     path: '/',
//     component: () => import('../TeacherIndex'),
//     children: [
//         {
//             path: '/',
//             name: 'home',
//             component: () => import('../views/home/Home')
//         },
//         {
//             path: '/Goods',
//             name: 'goods',
//             component: () => import(/* webpackChunkName: "about" */ '../components/Goods')
//         },{
//             path: '/Student',
//             name: 'Student',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Student')
//         },{
//             path: '/Archives',
//             name: 'Archives',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Archives')
//         },{
//             path: '/StuAtt',
//             name: 'StuAtt',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/StuAtt')
//         },{
//             path: '/Group',
//             name: 'Group',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Group')
//         },{
//             path: '/Score',
//             name: 'Score',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/Score')
//         },{
//             path: '/ScoringScheme',
//             name: 'ScoringScheme',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/ScoringScheme')
//         },{
//             path: '/TeachingEvaluation',
//             name: 'TeachingEvaluation',
//             component: () => import(/* webpackChunkName: "about" */ '../views/teacher/TeachingEvaluation')
//         }
//     ]
// },


/*管理员后端*/

// {
//     path: '/',
//     component: () => import('../AdminIndex'),
//     children: [
//         {
//             path: '/',
//             name: 'home',
//             component: () => import('../views/home/Home')
//         },
//     ]
// },


// ]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
